<?php if (!defined('THINK_PATH')) exit();?><!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv=Content-Type content="text/html; charset=utf-8">
<title>Logon...</title> 
<style>
body{background-color:#3B5E92;}
.circle_{border-radius: 5px; -webkit-border-radius: 5px; -moz-border-radius: 5px;}
.logonbg{background-color:#7F99CC; width:480px; height:320px; margin:100px auto;}
.logonbg_title{ color:#ffffff;  width:400px; padding-top:20px;}
.margincenter{ margin:10px auto;}
.textcenter{ text-align:center; }
.logonrow{height:34px; line-height:34px; width:320px; text-indent:20px;}
#msg{ height:18px; width:320px; line-height:18px; color:red; text-indent:20px;}
.logonrow span{ padding-right:16px; padding-right:31px\9; }
span.golden{color: #FFAA11; font-weight:bold; font-size:16px;}
.btn{border:1px solid #3B5E92; width:100px; height:35px; float:right; margin-right:20px;}
.ipt{color:#333; font-weight:bold; font-size:14px; padding:1px; height:22px; line-height:22px;border:1px solid  #3B5E92; background-color:#ede;}
</style>
</head>
<body>
	<div class="logonbg circle_">
		<form action="__URL__/logon" method="POST" onsubmit="return chkLogon(this);">
		<div class="logonbg_title margincenter textcenter"><h2>LOGON ADMINISTRATOR</h2></div>
		<div class="logonrow margincenter">
			<span class="golden">E</span><input class="ipt circle_" type="text" name="username" onkeyup="this.value=trim(this.value)" value="1234567890" autocomplete="off" />
		</div>
		<div class="logonrow margincenter">
			<span class="golden">P</span><input class="ipt circle_" type="password" name="passwd" onkeyup="this.value=trim(this.value)" value="1234567890" autocomplete="off" />
		</div>
		<div class="logonrow margincenter">
			<span class="golden">V</span><input class="ipt circle_" type="text" name="verify" maxlength="4" onkeyup="this.value=trim(this.value)" value="" size="4" autocomplete="off" onfocus="freshVerify();"/>&nbsp;<img id="verifyImg" class="circle_"  BORDER="0" align="absmiddle"/>
		</div>
		<div id="msg" class="margincenter"></div>
		<div class="logonrow margincenter">
			<input type="submit" name="submit" value="LOGON" class="btn circle_ margincenter"  />
		</div>
		</form>
	</div>
	<script>
		function $(id){
			return document.getElementById(id);
		}
		function freshVerify(){ 
			$('verifyImg').src='';
			//重载验证码
			var timenow = new Date().getTime();
			$('verifyImg').src= '__URL__/verify/'+timenow; 
		}
		//去左空格;
		function ltrim(s)
		{
		    return s.replace(/(^\s*)/g, "");
		}
		//去右空格;
		function rtrim(s)
		{
		    return s.replace(/(\s*$)/g, "");
		}
		//去左右空格;
		function trim(s)
		{
		    return rtrim(ltrim(s));
		}
		function chkLogon(frm){
			var user = trim(frm.username.value);
			if(user.length < 8){
				$('msg').innerHTML='WRONG USENAME!';
				frm.username.focus();
				return false;
			}
			var pwd = trim(frm.passwd.value);
			if(pwd.length < 10){
				$('msg').innerHTML='WRONG PWD!';
				frm.passwd.focus();
				return false;
			}
			var ver = trim(frm.verify.value);
			if(ver.length < 4){
				$('msg').innerHTML='WRONG VERIFYCODE!';
				frm.verify.focus();
				return false;
			} 
			return true;
		}
	</script>
</body>
</html>